const express = require('express');
const router = express.Router();
const entityInstanceController = require('../controllers/entityInstanceController');

// 创建实体实例
router.post('/create_entity_instance', entityInstanceController.createEntityInstance);

// 获取指定文档的所有实体实例
router.get('/get_entity_instances/:documentId', entityInstanceController.getEntityInstances);

// 更新实体实例
router.put('/update_entity_instance', entityInstanceController.updateEntityInstance);

// 删除单个实体实例
router.post('/delete_entity_instance', entityInstanceController.deleteEntityInstance);

// 删除指定实体类的所有实例
router.post('/delete_entity_instances_by_entity_id', entityInstanceController.deleteEntityInstancesByEntityId);

module.exports = router; 